import { Injectable } from '@angular/core';
import { HttpserviceProvider } from '../httpservice/httpservice';

/*
  Generated class for the BusiserviceProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class BusiserviceProvider {

  constructor(private httpservice: HttpserviceProvider) {
    console.log('Hello BusiserviceProvider Provider');
  }

  login(username, password, type) {
    return this.httpservice.post("/login/login?username=" + username + "&password=" + password + "&type=" + type);
  }

  getZwlist(){
    return this.httpservice.post("/zw/queryAllZwList");
  }

  getqzzlist(){
    return this.httpservice.post("/jl/queryAllJlList");
  }

  addqzz(qzz){
    return this.httpservice.post("/jl/addJl",qzz);
  }

  getQzzinfo(userid){
    return this.httpservice.post("/jl/queryJl?userid="+userid);
  }
  
  querySelfZwList(userid){
    return this.httpservice.post("/zw/querySelfZwList?userid="+userid);
  }
  zwadd(zw){
    return this.httpservice.post("/zw/addZw",zw);
  }
  zwquery(jobname,gzlx,gz,sheng,shi){
    return this.httpservice.post("/zw/zwquery?jobname="+jobname+"&gzlx="+gzlx+"&gz="+gz+"&sheng="+sheng+"&shi="+shi);
  }
 qzzquery(search){
    return this.httpservice.post("/jl/qzzsearch?searchtext="+search);
  }
}
